package models

import (
	"net/http"
)

type Res struct {
	Code int
	Data interface{}
	Message string
}

func ResE(message string) Res {
	return Res{
		Code: http.StatusBadRequest,
		Message: message,
	}
}

func ResA(code int, data interface{}, message string) Res {
	return Res{
		Code: code,
		Data: data,
		Message: message,
	}
}

func ResS(data interface{}) Res {
	return Res{
		Code: http.StatusOK,
		Data: data,
	}
}